package Demo01.Demo02;

public class Testlnner {
    public static void main(String[] args) {
        Swimming(name -> {System.out.println("有参Lanbda方法体"); System.out.println(name);});
        Swimming(new Inner() {
            @Override
            public void show(String name) {
                System.out.println("有参面向对象方法体");
                System.out.println(name);
            }
        });



        Swimming2(() -> System.out.println("无参Lanbda方法体"));
        Swimming2(new Inner2() {
            @Override
            public void show2() {
                System.out.println("无参面向对象方法体");
            }
        });
    }

    public static void Swimming(Inner swimming) {
        swimming.show("笔落惊风雨");

    }

    public static void Swimming2(Inner2 swimming2) {
        swimming2.show2();
    }
}

